/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.kj.entity;

import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * kj_bannerEntity
 * @author hzy
 * @version 2021-07-19
 */
@Table(name="kj_banner", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="img", attrName="img", label="图片", isQuery=false),
		@Column(name="title", attrName="title", label="标题", queryType=QueryType.LIKE),
		@Column(name="zindex", attrName="zindex", label="序号", isQuery=false),
		@Column(name="link_address", attrName="linkAddress", label="链接地址",isQuery = false),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class KjBanner extends DataEntity<KjBanner> {
	
	private static final long serialVersionUID = 1L;
	private String img;		// 图片
	private String title;		// 标题
	private Integer zindex;		// 序号
	private String linkAddress;//链接地址

	public KjBanner() {
		this(null);
	}

	public KjBanner(String id){
		super(id);
	}

	public String getLinkAddress() {
		return linkAddress;
	}

	public void setLinkAddress(String linkAddress) {
		this.linkAddress = linkAddress;
	}
	
	@Length(min=0, max=255, message="图片长度不能超过 255 个字符")
	public String getImg() {
		return img;
	}

	public void setImg(String img) {
		this.img = img;
	}
	
	@NotBlank(message="标题不能为空")
	@Length(min=0, max=255, message="标题长度不能超过 255 个字符")
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	public Integer getZindex() {
		return zindex;
	}

	public void setZindex(Integer zindex) {
		this.zindex = zindex;
	}
	
}